USE [Biblioteca]
GO
/****** Object:  StoredProcedure [dbo].[sp_ValidarUsuario]    Script Date: 09/06/2012 22:07:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Batch submitted through debugger: VerificarLibrosPendientes.sql|9|0|C:\Users\Cynthia\Desktop\Tp Electiva\db\scripts\store procedures\ValidarUsuario.sql

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[sp_VerificarLibrosPendientes]

@idSocio int , 
@tiene_libros_pendientes bit OUTPUT

AS
if (SELECT * From Prestamo WHERE idSocio = @idSocio
and  fechaRealDevolucion=null)is null
set @tiene_libros_pendientes = 0
else
set @tiene_libros_pendientes = 1

